package classes;

import ejb.GestoreLogin;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import jpa.Utente;

/**
 *
 * @author frazz
 */

@ManagedBean(name = "#{login}")
@RequestScoped
public class Loggati {

    GestoreLogin gl; //è un session bean
    String username;
    String password;
    String nome;
    String cognome;
    int crediti;
 
    
    public boolean loggati() {
        System.out.println("nulla");
        Utente esito = gl.entra(username, password);
        if (esito == null) {
            return false;
        } else {
          // ManagedBean utenteLoggato = new ManagedBean();
            return true;
        }

    }
}
